package com.yatube.nhx.enums;

import lombok.Getter;

/**
 * @author Created with IDEA
 * @description -- 统一返回结果状态码
 * @date 2024-04-22 17:47
 */
@Getter
public enum RCodeEnum {

    SUCCESS(200,"ok", "成功"),

    UN_AUTH(401,"no permission", "未授权"),
    FORBIDDEN(403,"ok", "禁止"),
    NOT_FOUND(404,"not fount", "未找到"),

    FAIL(500, "fail", "服务器内部错误"),
    ;

    private final Integer code;
    private final String message;
    private final String desc;

    RCodeEnum(Integer code, String message, String desc) {
        this.code = code;
        this.message = message;
        this.desc = desc;
    }
}
